<link rel="stylesheet" href="../addons/jy_pingdd_pin/resource/css/style.css" />
<style type="text/css">
.order_goods_img img {border: 1px solid rgb(215, 215, 215); border-image: none; width: 60px; height: 60px; display: block;}
.order_goods_price i {font-size: 9px;}
.order_goods_grab .order_goods_grab_txt {background: 0px 0px rgb(238, 51, 17); padding: 2px 3px; border-radius: 2px; color: rgb(255, 255, 255); display: inline-block;}
.tuan_g_price b {font-size: 18px; font-weight: 400; margin-right: 2px; margin-left: 5px;}
.tuan_g_price span {vertical-align: 1px;}
.order_status {height: 30px; color: rgb(221, 0, 0); line-height: 40px; float: left;}
.order_btn a {border-radius: 3px; width: 80px; height: 30px; text-align: center; color: rgb(255, 255, 255); line-height: 30px; margin-left: 5px; float: left; background-color: rgb(75, 75, 75); -webkit-border-radius: 3px;
}
#container{margin:0;background: none;}
.fui-list-angle span.text-danger{color: #ef4f4f;}
</style>
<div class='fui-page order-list-page'>
	<div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">参与的拼单</div>
			</div>
	 </div>
	<div class="fui-tab fui-tab-danger jy2-headertop" id="tab" style="top:4.2rem">
		<a ng-class="{'external active':pagedata.params.status == 100}" href="javascript:" ng-click="pagedata.params.status=100;tool.get_list('jy_pingdd_pin/myteam/getorder/',true);">全部拼单</a>
		<a ng-class="{'external active':pagedata.params.status == 0}" href="javascript:" ng-click="pagedata.params.status=0;tool.get_list('jy_pingdd_pin/myteam/getorder/',true);">待支付</a>
		<a ng-class="{'external active':pagedata.params.status == 10}" href="javascript:" ng-click="pagedata.params.status=10;tool.get_list('jy_pingdd_pin/myteam/getorder/',true);">拼单中</a>
        <a ng-class="{'external active':pagedata.params.status == 1}" href="javascript:" ng-click="pagedata.params.status=1;tool.get_list('jy_pingdd_pin/myteam/getorder/',true);">拼单成功</a>
        <a ng-class="{'external active':pagedata.params.status == 5}" href="javascript:" ng-click="pagedata.params.status=5;tool.get_list('jy_pingdd_pin/myteam/getorder/',true);">拼单失败</a>
	</div>
    <div class='fui-content' style="padding-bottom:0;top:4.8rem;position: absolute;">
		<div class='fui-content-inner' ng-if="!pagedata.list || pagedata.list.length==0">
			<div class='content-empty'>
				<i class='icon icon-lights'></i><br/>暂时没有参加任何拼单
			</div>
			<div class="fui-according-group" id="container"></div>
		</div>
		<div ng-repeat="item in pagedata.list" class='lynn_order_item'>
			<div class="external">
				<div class='lynn_order_title'>
					订单号: {{item.ordersn}}
					<span ng-if="item.teamid==0 || item.status==0" class="order_status" style="float:right;"> 还未开拼 </span>
					<span ng-if="item.status==1 || item.status==2 || item.status==3" class="order_status" style="float:right;"> 拼单成功</span>
					<span ng-if="item.status==5 || item.status==6" class="order_status" style="float:right;"> 拼单失败 </span>
					<span ng-if="item.teamid && item.team.status==0" class="order_status" style="float:right;"> 拼单进行中 </span>
					<span ng-if="item.team.status==3" class="order_status" style="float:right;"> 拼单已过期 </span>
				</div>
				<div class="fui-list lynn_order_list" style="background:#fff">
					<div class="fui-list-media">
						<img ng-src="{{tomedia(item.goods.image) || '../core/resource/images/nopic.jpg'}}" class="round">
					</div>
					<div class="fui-list-inner">
						<div class="lynn_order_list_title" style="height:1.2rem">{{item.goods.title}}</div>
						<div class="subtitle">{{item.createtime}}</div>
						<div ng-if="item.status==0" class="subtitle" style="color:red">还有￥{{item.goods.fan_price || 0.00}}待返，赶快来拼单吧！</div>
					</div>
					<div class='fui-list-angle' style="width:auto">
						<span class='marketprice text-danger'>¥{{item.goods.groupprice}}</span>/{{item.unit||'件'}}<br/>
						x1
					</div>
					<div style="position: absolute;right: 4rem;top:3px;width:3rem;height: 3rem;z-index: 10;">
						<img ng-if="item.status==10" alt="" width="100%" height="100%" src="/addons/jy_pingdd_pin/resource/images/frightin.png"/>
						<img ng-if="item.status==1 || item.status==2 || item.status==3" alt="" width="100%" height="100%" src="/addons/jy_pingdd_pin/resource/images/success.png"/>
						<img ng-if="item.status==5 || item.status==6" alt="" width="100%" height="100%" src="/addons/jy_pingdd_pin/resource/images/fail.png"/>
					</div>
				</div>
				<div class='lynn_order_price'>
					<span class='status'>
						运费: <span class='text-danger'>¥{{item.dispatchprice || '0.00'}}</span>元, 共 <span class='text-danger'>1</span> 个商品
						总额: <span class='text-danger'>¥{{item.price}}</span>元
					</span>
				</div>
			</div>
			<div class='lynn_order_bottom'>
				<span class="status">
					<a ng-if="item.team.status==1" class="lynn_btn lynn_btn_danger" href="javascript:;" ng-click="access_json('jy_pingdd_pin/goods.detail//id='+item.goodsid)">再拼一单</a>
					<a ng-if="item.teamid" class="external lynn_btn lynn_btn_danger" href="javascript:;" ng-click="access_json('jy_pingdd_pin/teamdetail/detail/teamid='+item.teamid)">查看拼单详情</a>
					<a ng-if="item.status==0" class="external lynn_btn lynn_btn_danger" href="javascript:;" ng-click="pay_submit({},'jy_pingdd_pin/myteam/pay/id='+item.id,'jy_pingdd_pin/myteam/','jy_pingdd_pin/myteam/')">支付发起拼单</a>
					<a ng-if="item.team.status==2" class="external lynn_btn lynn_btn_cancel">拼单失败</a>
					<a ng-if="item.status==1 && pagedata.pluginset.is_zhuan==1" class="external lynn_btn lynn_btn_danger" ng-click="pagedata.nowitem=item;pagedata.showzhuan=true">转积分</a>
				</span>
			</div>
		</div>
	 </div>
</div>
<div ng-if="pagedata.showzhuan" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
				.fui-cell-group .fui-cell .fui-cell-text {
					font-size: 0.75rem;
					color: #ddd;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.showzhuan=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 2rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在商品转积分操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-dixiaofei" style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'>当前订单金额：￥{{pagedata.nowitem.price}}</div>
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-jifen" style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'>可转积分额：{{pagedata.nowitem.zhuancredit1fee}}</div>
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-text'>转积分后，该订单将直接完成，同时您将无法获得该订单的商品！</div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post(pagedata.nowitem,'/myteam/zhuan/')">确认转积分</a>
			</div>
		</div>
	</div>
</div>
<!-- 关注公众号 -->
<div id="attention" ng-if="pagedata.showwechatcode==1">
    <div class="attention-alert">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.account.logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先关注我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.account.ewm) || '../core/resource/images/nopic.jpg'}}" style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p style="padding-bottom:0.6rem">长按指纹识别图中二维码</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showwechatcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.loading = true;  //状态标记
scope.isnodata = false;
//滚动加载
scope.tool.get_list('jy_pingdd_pin/myteam/getorder/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_pingdd_pin/myteam/getorder/');
}
</script>